/*
 * @Author: liu.lin liu.lin@hzleaper.com
 * @Date: 2023-11-15 17:09:24
 * @LastEditors: liu.lin liu.lin@hzleaper.com
 * @LastEditTime: 2023-11-16 13:55:07
 * @FilePath: \aoi_link_frontend\src\page\line-yield-analyse\component\Table\table.header.tsx
 * @Description: 这是表头
 *
 */

import { ColumnsType } from 'antd/es/table';
import { TableType } from './index.type';

export const columns: ColumnsType<TableType> = [
  {
    title: '厂区',
    dataIndex: 'site',
    key: 'site',
    // colSpan: 0,
    align: 'center'
  },
  {
    title: '产线',
    dataIndex: 'line',
    key: 'line',
    align: 'center'
  },
  {
    title: '工站',
    dataIndex: 'station',
    key: 'station',
    align: 'center'
  },
  {
    title: '2023/11/13',
    dataIndex: 'dateTime',
    align: 'center',
    children: [
      {
        title: '产量',
        dataIndex: 'outPut',
        key: 'outPut',
        align: 'center'
      },
      {
        title: '良率',
        dataIndex: 'yeild',
        key: 'yeild',
        align: 'center'
      }
    ]
  },
  {
    title: '2023/11/14',
    dataIndex: 'dateTime',
    align: 'center',
    children: [
      {
        title: '产量',
        dataIndex: 'outPut',
        key: 'outPut',
        align: 'center'
      },
      {
        title: '良率',
        dataIndex: 'yeild',
        key: 'yeild',
        align: 'center'
      }
    ]
  },
  {
    title: '2023/11/15',
    dataIndex: 'dateTime',
    align: 'center',
    children: [
      {
        title: '产量',
        dataIndex: 'outPut',
        key: 'outPut',
        align: 'center'
      },
      {
        title: '良率',
        dataIndex: 'yeild',
        key: 'yeild',
        align: 'center'
      }
    ]
  },
  {
    title: '2023/11/16',
    dataIndex: 'dateTime',
    align: 'center',
    children: [
      {
        title: '产量',
        dataIndex: 'outPut',
        key: 'outPut',
        align: 'center'
      },
      {
        title: '良率',
        dataIndex: 'yeild',
        key: 'yeild',
        align: 'center'
      }
    ]
  },
  {
    title: '2023/11/17',
    dataIndex: 'dateTime',
    align: 'center',
    children: [
      {
        title: '产量',
        dataIndex: 'outPut',
        key: 'outPut',
        align: 'center'
      },
      {
        title: '良率',
        dataIndex: 'yeild',
        key: 'yeild',
        align: 'center'
      }
    ]
  },
  {
    title: '2023/11/18',
    dataIndex: 'dateTime',
    align: 'center',
    children: [
      {
        title: '产量',
        dataIndex: 'outPut',
        key: 'outPut',
        align: 'center'
      },
      {
        title: '良率',
        dataIndex: 'yeild',
        key: 'yeild',
        align: 'center'
      }
    ]
  },
  {
    title: '2023/11/19',
    dataIndex: 'dateTime',
    align: 'center',
    children: [
      {
        title: '产量',
        dataIndex: 'outPut',
        key: 'outPut',
        align: 'center'
      },
      {
        title: '良率',
        dataIndex: 'yeild',
        key: 'yeild',
        align: 'center'
      }
    ]
  }
];

const list = [
  // 厂区1
  {
    factory_id: 'factory1',
    factory_name: '厂区',
    line_totalNmae: '产线合计',
    line_total: 2000,
    factory_lines: [
      {
        line_id: 'line1',
        line_name: '一线',
        station: [
          {
            station_id: 'pantiehou',
            station_name: '偏贴后',
            datas: [
              {
                time: '2023/11/13',
                outPut: 1000,
                yeild: '90%'
              },
              {
                time: '2023/11/14',
                outPut: 1000,
                yeild: '90%'
              },
              {
                time: '2023/11/15',
                outPut: 1000,
                yeild: '90%'
              }
            ]
          },
          {
            station_id: 'pol',
            station_name: 'POL',
            datas: [
              {
                time: '2023/11/13',
                outPut: 1000,
                yeild: '90%'
              },
              {
                time: '2023/11/14',
                outPut: 1000,
                yeild: '90%'
              },
              {
                time: '2023/11/15',
                outPut: 1000,
                yeild: '90%'
              }
            ]
          },
          {
            station_id: 'chanxiantotal',
            station_name: '产线',
            datas: [
              {
                time: '2023/11/13',
                outPut: 1000,
                yeild: '90%'
              },
              {
                time: '2023/11/14',
                outPut: 1000,
                yeild: '90%'
              },
              {
                time: '2023/11/15',
                outPut: 1000,
                yeild: '90%'
              }
            ]
          }
        ]
      },
      {
        line_id: 'line2',
        line_name: '二线',
        station: [
          {
            station_id: 'pantiehou',
            station_name: '偏贴后',
            datas: [
              {
                time: '2023/11/13',
                outPut: 1000,
                yeild: '90%'
              },
              {
                time: '2023/11/14',
                outPut: 1000,
                yeild: '90%'
              },
              {
                time: '2023/11/15',
                outPut: 1000,
                yeild: '90%'
              }
            ]
          },
          {
            station_id: 'pol',
            station_name: 'POL',
            datas: [
              {
                time: '2023/11/13',
                outPut: 1000,
                yeild: '90%'
              },
              {
                time: '2023/11/14',
                outPut: 1000,
                yeild: '90%'
              },
              {
                time: '2023/11/15',
                outPut: 1000,
                yeild: '90%'
              }
            ]
          },
          {
            station_id: 'chanxiantotal',
            station_name: '产线',
            datas: [
              {
                time: '2023/11/13',
                outPut: 1000,
                yeild: '90%'
              },
              {
                time: '2023/11/14',
                outPut: 1000,
                yeild: '90%'
              },
              {
                time: '2023/11/15',
                outPut: 1000,
                yeild: '90%'
              }
            ]
          }
        ]
      }
    ]
  },

  // 厂区2
  {}
];
